import request from '@/plugin/axios'
import { sysPath } from '@api/sys.common'

//分账规则
export function getRuleList(data) {
	return request({
		url: sysPath + '/admin/v1/ccb/settle/rule/page',
		method: 'post',
		data
	})
}

export function addRule(data) {
	return request({
		url: sysPath + '/admin/v1/ccb/settle/rule/add',
		method: 'post',
		data
	})
}

export function editRule(data) {
	return request({
		url: sysPath + '/admin/v1/ccb/settle/rule/edit',
		method: 'post',
		data
	})
}

export function removeRule(params) {
	return request({
		url: sysPath + '/admin/v1/ccb/settle/rule/remove',
		method: 'post',
		params
	})
}

//分账订单
export function getOrderList(data) {
	return request({
		url: sysPath + '/admin/v1/ccb/order/page',
		method: 'post',
		data
	})
}

//分账商户
export function getAccountList(data) {
	return request({
		url: sysPath + '/admin/v1/ccb/merchant/page',
		method: 'post',
		data
	})
}

export function getRelatedMerchants(params) {
	return request({
		url: sysPath + '/admin/v1/ccb/merchant/relation/list',
		method: 'post',
		params
	})
}